<?php
require_once("../data/DataHandler.php");
require_once("../config/FileTypes.php");
session_start();

$data_handler = DataHandler::singleton();
$rating = $_POST['rating'];
$review = $_POST['review'];
$reviewer = $_SESSION['active_user']->getUsername();
$applicant = $_POST['applicant'];
if($data_handler->enterReview($rating, $review, $reviewer, $applicant)) {
  echo "Rating and review added successfully!";
} else "<label class = 'error'>Error updating adding rating and review</label>";

?>
